home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.42 / includes3v1 / includes3v1.lha / Exec / ExecBase.i < prev    next >
Text File  |  1994-12-04  |  7KB  |  197 lines

  1.  
  2.  
  3. {
  4.         exec/execbase.i
  5. }
  6.  
  7.  
  8. {$I "Include:exec/lists.i" }
  9. {$I "Include:exec/interrupts.i" }
  10. {$I "Include:exec/libraries.i" }
  11. {$I "Include:exec/tasks.i" }
  12.  
  13.  
  14. {  Definition of the Exec library base structure (pointed to by location 4).
  15. ** Most fields are not to be viewed or modified by user programs.  Use
  16. ** extreme caution.
  17.  }
  18.  
  19. Type
  20.  
  21. ExecBase = Record
  22.         LibNode    : Library;   {  Standard library node  }
  23.  
  24. { ******* Static System Variables ******* }
  25.  
  26.         SoftVer,                {  kickstart release number (obs.)  }
  27.         LowMemChkSum : Short;   {  checksum of 68000 trap vectors  }
  28.         ChkBase      : Integer; {  system base pointer complement  }
  29.         ColdCapture,            {  coldstart soft capture vector  }
  30.         CoolCapture,            {  coolstart soft capture vector  }
  31.         WarmCapture,            {  warmstart soft capture vector  }
  32.         SysStkUpper,            {  system stack base   (upper bound)  }
  33.         SysStkLower  : Address; {  top of system stack (lower bound)  }
  34.         MaxLocMem    : Integer; {  top of chip memory  }
  35.         DebugEntry,             {  global debugger entry point  }
  36.         DebugData,              {  global debugger data segment  }
  37.         AlertData,              {  alert data segment  }
  38.         MaxExtMem    : Address; {  top of extended mem, or null if none  }
  39.  
  40.         ChkSum       : Short;   {  for all of the above (minus 2)  }
  41.  
  42. { ***** Interrupt Related ************************************** }
  43.  
  44.         IntVects     : Array[0..15] of IntVector;
  45.  
  46. { ***** Dynamic System Variables ************************************ }
  47.  
  48.         ThisTask     : TaskPtr; {  pointer to current task (readable)  }
  49.  
  50.         IdleCount,              {  idle counter  }
  51.         DispCount    : Integer; {  dispatch counter  }
  52.         Quantum,                {  time slice quantum  }
  53.         Elapsed,                {  current quantum ticks  }
  54.         SysFlags     : Short;   {  misc internal system flags  }
  55.         IDNestCnt,              {  interrupt disable nesting count  }
  56.         TDNestCnt    : Byte;    {  task disable nesting count  }
  57.  
  58.         AttnFlags,              {  special attention flags (readable)  }
  59.         AttnResched  : Short;   {  rescheduling attention  }
  60.         ResModules,             {  resident module array pointer  }
  61.         TaskTrapCode,
  62.         TaskExceptCode,
  63.         TaskExitCode : Address;
  64.         TaskSigAlloc : Integer;
  65.         TaskTrapAlloc: Short;
  66.  
  67.  
  68. { ***** System Lists (private!) ******************************* }
  69.  
  70.         MemList,
  71.         ResourceList,
  72.         DeviceList,
  73.         IntrList,
  74.         LibList,
  75.         PortList,
  76.         TaskReady,
  77.         TaskWait     : List;
  78.  
  79.         SoftInts     : Array[0..4] of SoftIntList;
  80.  
  81. { ***** Other Globals ****************************************** }
  82.  
  83.         LastAlert    : Array[0..3] of Integer;
  84.  
  85.         {  these next two variables are provided to allow
  86.         ** system developers to have a rough idea of the
  87.         ** period of two externally controlled signals --
  88.         ** the time between vertical blank interrupts and the
  89.         ** external line rate (which is counted by CIA A's
  90.         ** "time of day" clock).  In general these values
  91.         ** will be 50 or 60, and may or may not track each
  92.         ** other.  These values replace the obsolete AFB_PAL
  93.         ** and AFB_50HZ flags.
  94.          }
  95.  
  96.         VBlankFrequency,                {  (readable)  }
  97.         PowerSupplyFrequency : Byte;    {  (readable)  }
  98.  
  99.         SemaphoreList    : List;
  100.  
  101.         {  these next two are to be able to kickstart into user ram.
  102.         ** KickMemPtr holds a singly linked list of MemLists which
  103.         ** will be removed from the memory list via AllocAbs.  If
  104.         ** all the AllocAbs's succeeded, then the KickTagPtr will
  105.         ** be added to the rom tag list.
  106.          }
  107.  
  108.         KickMemPtr,             {  ptr to queue of mem lists  }
  109.         KickTagPtr,             {  ptr to rom tag queue  }
  110.         KickCheckSum : Address; {  checksum for mem and tags  }
  111.  
  112. { ***** V36 Exec additions start here ************************************* }
  113.  
  114.         ex_Pad0           : Short;
  115.         ex_Reserved0      : Integer;
  116.         ex_RamLibPrivate  : Address;
  117.  
  118.         {  The next ULONG contains the system "E" clock frequency,
  119.         ** expressed in Hertz.  The E clock is used as a timebase for
  120.         ** the Amiga's 8520 I/O chips. (E is connected to "02").
  121.         ** Typical values are 715909 for NTSC, or 709379 for PAL.
  122.          }
  123.  
  124.         ex_EClockFrequency,     {  (readable)  }
  125.         ex_CacheControl,        {  Private to CacheControl calls  }
  126.         ex_TaskID,              {  Next available task ID  }
  127.  
  128.         ex_Reserved1      : Array[0..4] of Integer;
  129.  
  130.         ex_MMULock        : Address;    {  private  }
  131.  
  132.         ex_Reserved2      : Array[0..2] of Integer;
  133. {***** V39 Exec additions start here *************************************}
  134.  
  135.         { The following list and data element are used
  136.          * for V39 exec's low memory handler...
  137.          }
  138.         ex_MemHandlers    : MinList; { The handler list }
  139.         ex_MemHandler     : Address;          { Private! handler pointer }
  140.         ex_Reserved       : Array[0..1] of Byte;
  141. end;
  142. ExecBasePtr = ^ExecBase;
  143.  
  144.  
  145. { ***** Bit defines for AttnFlags (see above) ***************************** }
  146.  
  147. {   Processors and Co-processors:  }
  148.  
  149. CONST
  150.  
  151.   AFB_68010     = 0;    {  also set for 68020  }
  152.   AFB_68020     = 1;    {  also set for 68030  }
  153.   AFB_68030     = 2;    {  also set for 68040  }
  154.   AFB_68040     = 3;
  155.   AFB_68881     = 4;    {  also set for 68882  }
  156.   AFB_68882     = 5;
  157.   AFB_FPU40     = 6;    {  Set if 68040 FPU }
  158.  
  159.   AFF_68010     = %00000001;
  160.   AFF_68020     = %00000010;
  161.   AFF_68030     = %00000100;
  162.   AFF_68040     = %00001000;
  163.   AFF_68881     = %00010000;
  164.   AFF_68882     = %00100000;
  165.   AFF_FPU40     = %01000000;
  166.  
  167. {    AFB_RESERVED8 = %000100000000;  }
  168. {    AFB_RESERVED9 = %001000000000;  }
  169.  
  170.  
  171. { ***** Selected flag definitions for Cache manipulation calls ********* }
  172.  
  173.   CACRF_EnableI       = %0000000000000001;  { Enable instruction cache  }
  174.   CACRF_FreezeI       = %0000000000000010;  { Freeze instruction cache  }
  175.   CACRF_ClearI        = %0000000000001000;  { Clear instruction cache   }
  176.   CACRF_IBE           = %0000000000010000;  { Instruction burst enable  }
  177.   CACRF_EnableD       = %0000000100000000;  { 68030 Enable data cache   }
  178.   CACRF_FreezeD       = %0000001000000000;  { 68030 Freeze data cache   }
  179.   CACRF_ClearD        = %0000100000000000;  { 68030 Clear data cache    }
  180.   CACRF_DBE           = %0001000000000000;  { 68030 Data burst enable   }
  181.   CACRF_WriteAllocate = %0010000000000000;  { 68030 Write-Allocate mode
  182.                                               (must always be set!)     }
  183.   CACRF_EnableE       = 1073741824;  { Master enable for external caches }
  184.                                      { External caches should track the }
  185.                                      { state of the internal caches }
  186.                                      { such that they do not cache anything }
  187.                                      { that the internal cache turned off }
  188.                                      { for. }
  189.  
  190.   CACRF_CopyBack      = $80000000;  { Master enable for copyback caches }
  191.  
  192.   DMA_Continue        = 2;      { Continuation flag for CachePreDMA }
  193.   DMA_NoModify        = 4;      { Set if DMA does not update memory }
  194.   DMA_ReadFromRAM     = 8;      { Set if DMA goes *FROM* RAM to device }
  195.  
  196.  
  197.